<?php
require_once "$path/public/Banner.php";
$banner = new Banner();
$dataList = $banner->findList(["page_type" => $_GET["id"]]);
if (!empty($dataList)) {
    ?>
    <div class="banner nivoSlider">
        <?php
        foreach ($dataList as $key => $val) {
            if (strlen($val["linkUrlDynamic"])>0) {
                echo "<a href=" . ($cms->is_html ? $val["linkUrlHtml"] : $val["linkUrlDynamic"]) . ">";
            }
            echo "<img src=/$basepath/" . $val["url"] . " title=" . $val["title"] . "/>";
            if (strlen($val["linkUrlDynamic"])>0) {
                echo "</a>";
            }
        }
        ?>
    </div>
    <script>
        window.onload=function(){
            $('.banner').nivoSlider();
        };
    </script>
<?php } ?>
<!--<div class="banner"><img src="/<?php /*echo $basepath */?>/assert/images/banner5.jpg" alt=""></div>
<div class="banner" style="display: none;"><img src="/<?php /*echo $basepath */?>/assert/images/banner16.jpg" alt=""></div>
<div class="banner" style="display: none;"><img src="/<?php /*echo $basepath */?>/assert/images/banner43.jpg" alt=""></div>
<div class="banner" style="display: none;"><img src="/<?php /*echo $basepath */?>/assert/images/banner44.jpg" alt=""></div>-->